import store from "./store";

import Vue from "vue";
import App from "./App.vue";
import router from "./router";

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
import '@/assets/css/index.scss'

import http from './server/ajax.js'
Vue.prototype.$http = http

Vue.directive('loadmore', {
  bind(el, binding) {
    const selectWrap = el.querySelector('.el-table__body-wrapper')
    selectWrap.addEventListener('scroll', function() {
      let sign = 0
      const scrollDistance = this.scrollHeight - this.scrollTop - this.clientHeight
      if (scrollDistance <= sign) {
        binding.value()
      }
    })
  }
})


Vue.config.productionTip = false;
import * as echarts from 'echarts';
Vue.prototype.$echarts = echarts
new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
